<?php
namespace App\Http\Controllers\CmsApi;

use App\Http\Controllers\BaseController;
use Illuminate\Http\Request;
use App\Lib\Response;
use App\Http\Model\Hint;
use App\Http\Services\FeedbackServices;

class FeedbackController extends BaseController
{
    private $feedback_service; //反馈server

    public function __construct()
    {
        $this->feedback_service = new FeedbackServices();
    }
    /**
     * 处理问题反馈
     */
    public function ChangeStatus(Request $request)
    {
        $params = $request->all();
        if (empty($params['id']))
        {
            Response::returnResult(Hint::PARAM_ERROR,[],'缺少参数id');
        }
        if (empty($params['note']))
        {
            Response::returnResult(Hint::PARAM_ERROR,[],'缺少备注');
        }
        $res = $this->feedback_service->feedbackUpdate($params);
        Response::returnResult(Hint::SUCCESS,[],$res);
    }
}
